package com.scd.boot.config;

import com.scd.boot.filter.StreamCopyFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {


    @Bean
    public FilterRegistrationBean<StreamCopyFilter> streamCopyFilter() {
        FilterRegistrationBean<StreamCopyFilter> filterFilterRegistrationBean = new FilterRegistrationBean<>();
        filterFilterRegistrationBean.setFilter(new StreamCopyFilter());
        filterFilterRegistrationBean.addUrlPatterns("/sign/*");
        return filterFilterRegistrationBean;
    }
}
